#include "gtkanimationdescription.h"
#include "gtktimeline.h"
#include "gtkiconfactory.h"
+#include "gtkwidgetprivate.h"
/**
* SECTION:gtkstylecontext
void
_gtk_style_context_coalesce_animation_areas (GtkStyleContext *context,
- gint rel_x,
- gint rel_y)
+ GtkWidget *widget)
{
GtkStyleContextPrivate *priv;
GSList *l;
while (l)
{
AnimationInfo *info;
+ gint rel_x, rel_y;
GSList *cur;
guint i;
}
info->invalidation_region = cairo_region_create ();
+ _gtk_widget_get_translation_to_window (widget, info->window, &rel_x, &rel_y);
for (i = 0; i < info->rectangles->len; i++)
{
GParamSpec *pspec);
void _gtk_style_context_invalidate_animation_areas (GtkStyleContext *context);
void _gtk_style_context_coalesce_animation_areas (GtkStyleContext *context,
- gint rel_x,
- gint rel_y);
+ GtkWidget *widget);
void gtk_style_context_invalidate (GtkStyleContext *context);
void gtk_style_context_reset_widgets (GdkScreen *screen);
}
context = gtk_widget_get_style_context (widget);
- _gtk_style_context_coalesce_animation_areas (context,
- widget->priv->allocation.x,
- widget->priv->allocation.y);
+ _gtk_style_context_coalesce_animation_areas (context, widget);
}
/**
}
/* Returns TRUE if a translation should be done */
-static gboolean
-gtk_widget_get_translation_to_window (GtkWidget *widget,
- GdkWindow *window,
- int *x,
- int *y)
+gboolean
+_gtk_widget_get_translation_to_window (GtkWidget *widget,
+ GdkWindow *window,
+ int *x,
+ int *y)
{
GdkWindow *w, *widget_window;
g_return_if_fail (GTK_IS_WIDGET (widget));
g_return_if_fail (GDK_IS_WINDOW (window));
- if (gtk_widget_get_translation_to_window (widget, window, &x, &y))
+ if (_gtk_widget_get_translation_to_window (widget, window, &x, &y))
cairo_translate (cr, x, y);
}
gdk_cairo_region (cr, event->expose.region);
cairo_clip (cr);
- do_clip = gtk_widget_get_translation_to_window (widget,
- event->expose.window,
- &x, &y);
+ do_clip = _gtk_widget_get_translation_to_window (widget,
+ event->expose.window,
+ &x, &y);
cairo_translate (cr, -x, -y);
_gtk_widget_draw_internal (widget, cr, do_clip);